home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-03-23 | 1.6 KB | 46 lines | [TEXT/GEOL] |
- Item forwarded by MACAPP.ADMIN to NORVELL.J
-
- Item 2533895 23-March-90 10:04PST
-
- From: WILSON6 Wilson, Dave-Personal Concepts,VCA
-
- To: D5284 BDM Int'l, Ann Confer,PRT
- DAWSON.M Dawson, Mark
-
- cc: MACAPP.TECH$ MacApp Technical
-
- Sub: TTEViews in Dialogs
-
- There have been a couple of questions lately about using TTEViews in a dialog.
- My experience has been that an enclosing TDialogView will use the Tab key to
- move the user from one TEditText to another, but will not activate a TTEView.
- In fact, if you used the new unsupported TTabTEView in MacApp 2.0 final, then
- you probably want a TTEView to accept the tab chatacters, rather than switch
- you to another view.
-
- To activate the TEView, you need to make it the target view, so it gets DoIdle
- and DoKeyCommand messages. I think you want a mouse click to be the mechanism
- to activate the text paragraph, so you should subclass TTEView and override
- DoMouseCommand. Without testing ,the code might be:
-
- {$S ASelCommand}
- FUNCTION TMyTEView.DoMouseCommand(VAR theMouse: Point;
- VAR info: EventInfo; VAR hysteresis: Point): TCommand; OVERRIDE;
- BEGIN
- IF gTarget = SELF THEN
- DoMouseCommand := INHERITED DoMouseCommand(theMouse, info, hysteresis)
- ELSE BEGIN
- SELF.GetWindow.SetTarget(SELF);
- DoMouseCommand := gNoChanges; {can use NIL with 2.0 final}
- END; {ELSE}
- END;
-
- Remember to make instances of this new subclass when using ViewEdit.
-
- If you try this, let me know if it works.
-
- Thanks,
-
- Dave
-
-